<template>
	<view class="index">
		<view class="head flex">
			<image :src="info.logo" mode="" class="" style="width: 120rpx;height: 120rpx;border-radius: 5rpx;">
			</image>
			<view class="margin_left_20">
				<view class="shopname" style="font-weight: 600;">{{info.shangjia_name}}</view>
				<view class="margin_top_20">{{info.tel}}</view>
				<view class="margin_top_20">余额：{{info.money}}</view>
			</view>
		</view>
		<!--<view class="dpxx">
		 	<view class="jiu_01" @click="shao()">
				<view><img src="../../static/img/shop/mp.png" /></view>
				<view>扫码查单</view>
			</view> -->
		<!-- <view class="jiu_01">
				<navigator url="/pagesA/shangjia/edit/yanzheng/yanzheng">
					<view><img src="../../static/img/shop/mp.png" /></view>
					<view>输码签收</view>
				</navigator>
			</view> 
			<view class="jiu_01 ">
				<navigator url="/pagesA/shangjia/tixian-apply/tixian-apply">
					<view><img src="@/static/img/shop/tixian.png" /></view>
					<view>申请提现</view>
				</navigator>
			</view>
		</view>-->
		<view class="more">
			<view class='mo'>
				<view class='mo_01'>数据交易</view>
				<!-- 	<navigator url="/pagesA/shangjia/user/tongji/tongji"> 
				<view class='mo_02'>更多 <uni-icon type="arrowright" size="15" color="#D6D6D6"></uni-icon>
				</view> -->
				</navigator>
			</view>
		</view>
		<view class="shuju">
			<view class="shuju_01">
				<view>今日订单/金额</view>
				<view class="shuju_01_s" v-if="allinfo.daycountnum>0">{{allinfo.daycountnum}} /
					¥{{allinfo.daycountmoney}}
				</view>
				<view class="shuju_01_s" v-else>0 / ¥0</view>
			</view>
			<view class="shuju_01 no">
				<view>昨日订单/金额</view>
				<view class="shuju_01_s" v-if="allinfo.todaycountnum>0">{{allinfo.todaycountnum}} /
					¥{{allinfo.todaycountmoney}}
				</view>
				<view class="shuju_01_s" v-else>0 / ¥0</view>
			</view>

			<view class="shuju_01">
				<view>总订单数/成交订单数</view>
				<view class="shuju_01_s ">{{allinfo.zcountnum}}/{{allinfo.ccountnum}}</view>
			</view>
			<view class="shuju_01 no">
				<view>总销售金额</view>
				<view class="shuju_01_s" v-if="allinfo.countmoney>0">¥ {{allinfo.countmoney}}</view>
				<view class="shuju_01_s" v-else>0 </view>
			</view>
		</view>
		<view class="BH"></view>
		<view class="six">
			<!-- -->
			<view class="jiu_01">
				<navigator url="/pages/shangjia/edit/shop/shop">
					<view><img src="@/static/img/shop/5.png" /></view>
					<view>门店编辑</view>
				</navigator>
			</view>
			<!---->
			<view class="jiu_01">
				<navigator :url="'/pages/shangjia/tixian-apply/tixian-apply?tx_money='+info.money">
					<view><img src="@/static/img/shop/5.png" /></view>
					<view>申请提现</view>
				</navigator>
			</view>
			<view class="jiu_01">
				<navigator url="/pages/shangjia/edit/pro_manage/pro_manage">
					<view><img src="@/static/img/shop/6.png" /></view>
					<view>商品管理</view>
				</navigator>
			</view>
			<view class="jiu_01">
				<navigator url="/pages/shangjia/order/order">
					<view><img src="@/static/img/shop/8.png" /></view>
					<view>订单管理</view>
				</navigator>
			</view>

			<!-- 			<view class="jiu_01">
				<navigator url="/pagesA/shangjia/hetong/index">
					<view><img src="../../static/img/shop/8.png" /></view>
					<view>电子合同</view>
				</navigator>
			</view> -->
			<!-- <view class="jiu_01">
				<navigator url="/pagesA/shangjia/order/tongji">
					<view><img src="../../static/img/shop/date.png" /></view>
					<view>订单统计</view>
				</navigator>
			</view>
			<view class="jiu_01">
				<navigator url="/pagesA/shangjia/shouyiList">
					<view><img src="../../static/img/shop/9.png" /></view>
					<view>我的提成</view>
				</navigator>
			</view> -->
			<!-- <view class="jiu_01">
				<navigator url="/pagesA/shangjia/user/tongji/tongji"> 
					<view><img src="../../static/img/shop/date.png" /></view>
					<view>经营数据</view>
				</navigator>
			</view>
	 		<view class="jiu_01">
				<navigator url="/pagesA/shangjia/couponlist/couponlist">
					<view><img src="../../static/img/shop/yhq.png" /></view>
					<view>优惠券</view>
				</navigator>
			</view> 
			<view class="jiu_01 ">
				<navigator url="/pagesA/shangjia/kehu/kehu">
					<view><img src="../../static/img/shop/people.png" /></view>
					<view>客户管理</view>
				</navigator>
			</view>-->
			<!-- <view class="jiu_01 ">
				<navigator url="/pagesA/shangjia/evaluate/evaluate">
					<view><img src="../../static/img/shop/4.png" /></view>
					<view>评价管理</view>
				</navigator>
			</view> 
			<view class="jiu_01 ">
					<navigator url="/pagesA/shangjia/tuiguang/tuiguang">
						<view><img src="../../static/img/shop/people.png" /></view>
						<view>我要推广</view>
					</navigator>
			</view>
			<view class="jiu_01 ">
				<navigator url="/pagesA/fabu/tuiguang_log?types=shop_tg">
					<view><img src="../../static/img/shop/people.png" /></view>
					<view>推广记录</view>
				</navigator>
			</view>
			<view class="jiu_01">
				<navigator url="/pagesA/shangjia/shouyiList">
					<view><img src="../../static/img/shop/5.png" /></view>
					<view>账目管理</view>
				</navigator>
			</view>
 			<view class="jiu_01 ">
				<navigator url="/pagesA/shangjia/poster/poster">
					<view><img src="@/imgs/poster.png" /></view>
					<view>海报生成</view>
				</navigator>
			</view> 
			<view class="jiu_01 ">
				<navigator url="/pagesA/shangjia/templace/templace">
					<view><img src="@/imgs/yfmb.png" /></view>
					<view>运费模板</view>
				</navigator>
			</view> 
			<view class="jiu_01 " >
				<navigator url="/pagesA/shangjia/certification/one/one">
					<view><img src="@/imgs/sjrz.png" /></view>
					<view>商家入驻</view>
				</navigator>
			</view> -->
		</view>
		<!-- 	<view class="BH"></view>
		<view class="more">
			<view class='mo'>
				<view class='mo_01'>广告直通车 
					 </view>
				<view class='mo_02'></view>
			</view>
		</view> -->
		<view class="list">
			<!-- 	<view class="list_01" @click="jump_choose">商家选择</view> -->
		</view>



	</view>
</template>

<script>
	export default {
		data() {
			return {
				tancl: false,
				shop: {
					id: 5,
					shop_name: "测试",
					today: [{
						today_num_total: 0,
						today_money_total: 0
					}],
					yesterday: [{
						yesterday_num_total: 0,
						yesterday_money_total: 0,
					}],
					total: [{
						all_num_total: 1,
						all_money_total: 188.00
					}]
				},
				info: [],
				shopInfo: [],
				allinfo: []
			}
		},
		onShow() {
			//#ifdef MP-WEIXIN
			wx.showShareMenu({
				withShareTicket: true,
				menus: ['shareAppMessage', 'shareTimeline']
			})
			//#endif
		},
		onShareAppMessage(res) {
			return {
				path: '/pagesA/shangjia/index/index',
				title: this.shopInfo.shangjia_name
			}
		},
		onLoad(option) {
			// this._load()
			this.global.request.post({
				data: {
					do: 'shangjia',
					op: 'info',
					s_id: option.s_id
				},
				success: res => {
					uni.setStorageSync('s_id', res.id)
					this.info = res
					this.global.request.post({
						data: {
							do: 'shangjia',
							op: 'allinfo',
							s_id: res.id
						},
						success: res => {
							this.allinfo = res
						}
					})
				}
			})
		},
		methods: {
			//扫码
			shao() {
				var that = this;
				uni.scanCode({
					success: function(res) {
						console.log('条码类型：' + res.scanType);
						console.log('条码内容：' + res.result);
						that.global.request.post({
							data: {
								do: 'Shop_saoma',
								equipment_number: res.result,
								s_id: uni.getStorageSync("s_id")
							},
							success: ress => {
								uni.navigateTo({
									url: '/pages/orderDetail/orderDetail?id=' + ress +
										'&type=shangjia'
								})
							}
						})

					}
				});

			},
			jump_choose() {
				uni.navigateTo({
					url: '/pagesA/shangjia/choose/choose'
				})
			}
		}
	}
</script>


<style lang="scss">
	.index {
		background: #fff;

		.H50 {
			height: 50px;
		}

		.head {
			background: #EB702D;
			padding: 20px 0px 60px 15px;
			border-radius: 0 0 30px 30px;
			color: #fff;
			font-size: 14px;
		}

		.shopname {
			color: #FFFFFF;
			font-size: 30rpx;
		}

		.dpxx {
			position: absolute;
			top: 100px;
			left: 15px;
			background-color: #fff;
			border-radius: 5px;
			width: 93%;
			justify-content: space-around;
			display: flex;
			box-shadow: 0 3px 10px #EBEBEB
		}

		.jiu {
			padding: 10px;
			display: flex;
			flex-wrap: wrap;
		}

		.jiu_01 {
			width: 33%;
			text-align: center;
			padding: 15px 10px 15px;
			box-sizing: border-box;
			font-size: 12px;
		}

		.jiu_01 img {
			width: 32px;
			height: 32px;
			margin-bottom: 10rpx;
		}

		.mo {
			padding: 10px;
			display: flex;
			justify-content: space-between;
			border-bottom: 1px solid #f0f0f0;
			line-height: 20px;
		}

		.mo_01 {
			padding-left: 10px;
			box-sizing: border-box;
			width: 80%;
			height: 20px;
			overflow: hidden;
			border-left: 3px solid #EB702D;
			font-size: 14px;
			font-weight: bold;
		}

		.mo_01 span {
			color: #8E8E8E;
			font-weight: 100;
			font-size: 12px;
			padding-left: 10px;
		}

		.mo_02 {
			color: #D6D6D6;
		}

		.shuju {
			display: flex;
			flex-wrap: wrap;
		}

		.shuju_01 {
			width: 50%;
			text-align: center;
			padding: 18px 10px;
			box-sizing: border-box;
			font-size: 14px;
			line-height: 25px;
			font-size: 14px;
			border-right: 1px solid #f0f0f0;
			border-bottom: 1px solid #f0f0f0;
		}

		.shuju_01_s {
			color: #EB511B;
			font-weight: 800;
			font-size: 16px;
		}

		.no {
			border-right: none;
		}

		.BH {
			background-color: #F1F1F1;
			height: 5px;
		}

		.six {
			padding: 10px;
			display: flex;
			flex-wrap: wrap;
		}

		.list_01 {
			padding: 15px 10px 8px;
			border-bottom: 1px solid #F4F4F4;
			font-size: 12px;
		}
	}
</style>
